package com.dingreading.cloud.mall.service.impl;

import com.dingreading.cloud.mall.entity.WhStockOutDelivery;
import com.dingreading.cloud.mall.entity.table.WhStockOutDeliveryTableDef;
import com.dingreading.cloud.mall.mapper.WhStockOutDeliveryMapper;
import com.dingreading.cloud.mall.service.WhStockOutDeliveryService;
import com.mybatisflex.core.query.QueryCondition;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.util.SqlUtil;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务层实现。
 *
 * @author Administrator
 * @since 2024-02-27
 */
@Service
public class WhStockOutDeliveryServiceImpl extends BaseServiceImpl<WhStockOutDeliveryMapper, WhStockOutDelivery, WhStockOutDeliveryTableDef> implements WhStockOutDeliveryService {

    @Override
    protected WhStockOutDeliveryTableDef getTable() {
        return WhStockOutDeliveryTableDef.whStockOutDelivery;
    }

    @Override
    public List<WhStockOutDelivery> listByOutCodes(List<String> outCodes) {
        QueryWrapper wrapper = QueryWrapper.create()
                .where(table.outCode.in(outCodes))
                .orderBy(table.id.asc());
        return getMapper().selectListByQuery(wrapper);
    }

}
